<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('index')}">项目管理</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
			关键字:
			<input type="text" class="form-control" name="keyword" style="width: 200px;"
				   value="{:input('request.keyword/s','')}" placeholder="请输入关键字...">
			<input type="submit" class="btn btn-primary" value="搜索"/>
			<a class="btn btn-danger" href="{:url('index')}">清空</a>
		</form>
		<div class="table-actions">
			<div class="btn-group">
				<if condition="auth_check('add')"><a href="{:url('add')}" class="btn btn-default">立项</a></if>
			</div>
		</div>
		<table class="table table-hover table-bordered margin-top-20">
			<thead>
				<tr>
					<!-- <th width="50">ID</th> -->
					<th>项目名称</th>
					<th>项目负责人</th>
					<th>进度</th>
					<th>立项时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="lists" item="vo">
				<tr>
					<!-- <td>{$vo.id}</td> -->
					<td>{$vo.name}</td>
					<td>{$vo.user_nickname}</td>
					<td>{$vo|get_project_status}</td>
					<td>{$vo.create_time|date="Y-m-d",###}</td>
					<td>
						<a href='javascript:parent.openIframeLayer("{:url("team",["pid" => $vo["id"]])}","项目团队")'>项目团队</a>
						<eq name="uid" value="1">
							<a href='{:url("edit",array("id"=>$vo["id"]))}'>编辑</a>
						</eq>
						<switch name="vo.status">
							<case value="1">
								<eq name="vo.oid" value="$uid">
									<if condition="auth_check('confirm')"><a href='{:url("confirm",array("pid"=>$vo["id"]))}'>确认</a></if>
								</eq>
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('edit')"><a href='{:url("edit",array("id"=>$vo["id"]))}'>编辑</a> </if>
								</eq>
							</case>
							<case value="2">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('dataupdate')"><a href='{:url("dataupdate",array("pid"=>$vo["id"]))}'>资料上传</a> </if>
								</eq>
							</case>
							<case value="3">
								<eq name="vo.utype" value="5">
									<eq name="vo.check_cw" value="0">
										<if condition="auth_check('check_cw')"><a href='{:url("check_cw",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
								<eq name="vo.utype" value="6">
									<eq name="vo.check_fk" value="0">
										<if condition="auth_check('check_fk')"><a href='{:url("check_fk",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
							</case>
							<case value="4">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('dataupdate')"><a href='{:url("dataupdate",array("pid"=>$vo["id"]))}'>资料上传</a> </if>
								</eq>
							</case>
							<case value="5">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('finalized')"><a href='{:url("finalized",array("pid"=>$vo["id"]))}'>落定</a> </if>
								</eq>
							</case>
							<case value="6">
								<eq name="vo.utype" value="5">
									<eq name="vo.check_cw" value="0">
										<if condition="auth_check('check_cw')"><a href='{:url("check_cw",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
								<eq name="vo.utype" value="6">
									<eq name="vo.check_fk" value="0">
										<if condition="auth_check('check_fk')"><a href='{:url("check_fk",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
							</case>
							<case value="7">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('finalized')"><a href='{:url("finalized",array("pid"=>$vo["id"]))}'>落定</a> </if>
								</eq>
							</case>
							<case value="8">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('final')"><a href='{:url("final",array("pid"=>$vo["id"]))}' class="js-ajax-dialog-btn" data-msg="是否申请完成？">申请完成</a> </if>
									<eq name="vo.yunying" value="0">
										<if condition="auth_check('set_yunying')"><a href='{:url("set_yunying",array("pid"=>$vo["id"]))}'>分配运营</a> </if>
									</eq>
								</eq>
								<eq name="vo.utype" value="7">
									<if condition="auth_check('change')"><a href='{:url("change",array("pid"=>$vo["id"]))}'>变更</a> </if>
								</eq>
							</case>
							<case value="9">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('change_sh')"><a href='{:url("change_sh",array("pid"=>$vo["id"]))}'>审核</a> </if>
								</eq>
							</case>
							<case value="10">
								<eq name="vo.utype" value="7">
									<if condition="auth_check('change')"><a href='{:url("change",array("pid"=>$vo["id"]))}'>变更</a> </if>
								</eq>
							</case>
							<case value="11">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('dataupdate')"><a href='{:url("dataupdate",array("pid"=>$vo["id"]))}'>资料上传</a> </if>
								</eq>
							</case>
							<case value="12">
								<eq name="vo.utype" value="5">
									<eq name="vo.check_cw" value="0">
										<if condition="auth_check('check_cw')"><a href='{:url("check_cw",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
							</case>
							<case value="13">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('dataupdate')"><a href='{:url("dataupdate",array("pid"=>$vo["id"]))}'>资料上传</a> </if>
								</eq>
							</case>
							<case value="14">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('dataupdate')"><a href='{:url("dataupdate",array("pid"=>$vo["id"]))}'>申请完成</a> </if>
								</eq>
								<if condition="auth_check('changestatus')"><a href='javascript:parent.openIframeLayer("{:url("changestatus",["pid" => $vo["id"]])}","变更进度")'>变更进度</a> </if>
							</case>
							<case value="15">
								<eq name="vo.utype" value="5">
									<eq name="vo.check_cw" value="0">
										<if condition="auth_check('check_cw')"><a href='{:url("check_cw",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
								<eq name="vo.utype" value="6">
									<eq name="vo.check_fk" value="0">
										<if condition="auth_check('check_fk')"><a href='{:url("check_fk",array("pid"=>$vo["id"]))}'>审核</a> </if>
									</eq>
								</eq>
								<if condition="auth_check('changestatus')"><a href='javascript:parent.openIframeLayer("{:url("changestatus",["pid" => $vo["id"]])}","变更进度")'>变更进度</a> </if>
							</case>
							<case value="16">
								<eq name="vo.mid" value="$uid">
									<if condition="auth_check('dataupdate')"><a href='{:url("dataupdate",array("pid"=>$vo["id"]))}'>申请完成</a> </if>
								</eq>
								<if condition="auth_check('changestatus')"><a href='javascript:parent.openIframeLayer("{:url("changestatus",["pid" => $vo["id"]])}","变更进度")'>变更进度</a> </if>
							</case>
							<case value="17">
								<if condition="auth_check('changestatus')"><a href='javascript:parent.openIframeLayer("{:url("changestatus",["pid" => $vo["id"]])}","变更进度")'>变更进度</a> </if>
							</case>
						</switch>
						<egt name="vo.status" value="2">
							<if condition="auth_check('files')"><a href='javascript:parent.openIframeLayer("{:url("files",["pid" => $vo["id"]])}","文件列表")'>文件列表</a></if>
						</egt>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}
			<li><a>共计 {$lists->total()} 条</a><li>
				<input class="page" type="text" name="pageNum" value="{$lists->getCurrentPage()}"/>
				<a class="topage" data-url="{$lists->getCurrentPath()}">跳转</a>
			</li></li>
		</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>